package main

func fib(n int) int {
	temp := make(map[int]int, 100)
	temp[0] = 0
	temp[1] = 1
	temp[2] = 1
	if n < 0 {
		panic("this is a negative number,forbidden!")
	} else if n < 3 {
		return temp[n]
	}
	for i := 3; i < n+1; i++ {
		temp[i] = temp[i-1] + temp[i-2]
	}
	return temp[n]
}
